﻿#region
/* ===============================================
 * 作者：guopeng           时间：2012/5/9 20:40:37
 * 
 * 
 * 类描述：
 * 
 * 
 * =============================================== */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ueEngine.Biz.Inf.Entities;
using ueEngine.Biz.Inf.LogicEntity.SupportData;
using ueEngine.Framework.Common;
using ueEngine.Biz.Inf.Entities.DBSupport;

namespace ueEngine.Biz.Inf.LogicEntity
{
    //public class CertificationModel : IAccessible<Certification,CertificationModel>
    //{
    //    #region self
    //    public int Id { get; set; }
    //    /// <summary>
    //    /// 认证类型。
    //    /// 0：企业认证
    //    /// </summary>
    //    public CertificationType CertificationType { get; set; }

    //    public string Agent { get; set; }
    //    /// <summary>
    //    /// 上传时间
    //    /// </summary>
    //    public DateTime PostDate { get; set; }
    //    /// <summary>
    //    /// 送审材料
    //    /// Json格式
    //    /// </summary>
    //    public List<SupportSheet> Support { get; set; }
    //    /// <summary>
    //    /// 投递方式
    //    /// 0：线上认证
    //    /// </summary>
    //    public DeliverWay DeliverWay { get; set; }

    //    /// <summary>
    //    /// 审核此资料的操作员
    //    /// </summary>
    //    public string Operator { get; set; }
    //    /// <summary>
    //    /// 审核结论
    //    /// </summary>
    //    public string ExamineResult { get; set; }
    //    /// <summary>
    //    /// 审核操作完成时间
    //    /// </summary>
    //    public DateTime ExcaminDate { get; set; }

    //    /// <summary>
    //    /// 是否已经通过认证
    //    /// </summary>
    //    public bool Certified { get; set; }

    //    /// <summary>
    //    /// 是否已经处理过了
    //    /// </summary>
    //    public bool IsClose { get; set; }
    //    #endregion

    //    protected override void Covariant(Certification dbModel)
    //    {
    //        Agent = dbModel.Agent;
    //        CertificationType = (CertificationType)dbModel.CertificationType;
    //        Certified = dbModel.Certified;
    //        DeliverWay = (DeliverWay)dbModel.DeliverWay;
    //        ExamineResult = dbModel.ExamineResult;
    //        ExcaminDate = dbModel.ExcaminDate;
    //        Id = dbModel.Id;
    //        Operator = dbModel.Operator;
    //        PostDate = dbModel.PostDate;
    //        IsClose = dbModel.IsClose;

    //        List<SupportSheet> support = dbModel.Support.ToObject<List<SupportSheet>>();
    //        this.Support = support;
    //    }
    //    protected override Certification Inverter(CertificationModel model)
    //    {
    //        return new Certification()
    //        {
    //            Agent = model.Agent,
    //            CertificationType = (int)model.CertificationType,
    //            Certified = model.Certified,
    //            DeliverWay = (int)model.DeliverWay,
    //            ExamineResult = model.ExamineResult,
    //            ExcaminDate = model.ExcaminDate,
    //            Id = model.Id,
    //            Operator = model.Operator,
    //            PostDate = model.PostDate,
    //            Support = model.Support.ToJson(),
    //            IsClose = model.IsClose
    //        };
    //    }
    //    //public override CertificationModel Element(System.Linq.Expressions.Expression<Func<Certification, bool>> where)
    //    //{
    //    //    Covariant(new Certification().Get(where));
    //    //    return this;
    //    //}
    //    //public override List<TResult> Elements<TResult>(System.Linq.Expressions.Expression<Func<Certification, bool>> where, System.Linq.Expressions.Expression<Func<Certification, TResult>> select)
    //    //{
    //    //    using (Context ctx = new Context())
    //    //    {
    //    //        return ctx.Certification.Where(where).Select(select).ToList();
    //    //    }
    //    //}
    //}
    //public class SupportSheet
    //{
    //    /// <summary>
    //    /// 资料类型 0:图片
    //    /// </summary>
    //    public int SupportType { get; set; }
    //    public DateTime postDate { get; set; }
    //    public string Agent { get; set; }
    //    public string Content { get; set; }
    //}

}
